home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pmlife10.zip / PMLIFE10.DOC < prev    next >
Text File  |  1996-10-18  |  7KB  |  147 lines

  1. PMLIFE 1.0
  2.  
  3.   This is an implemenataion of Conway's Life Game.  OS/2 2.0 (or the later 
  4. version) and Presentation Manager (PM) are requiered.  This is a 32-bit
  5. multithread application.
  6.  
  7. 0.  Archive contents
  8.   PMLIFE10.EXE  Excutable itself.
  9.   PMLIFE10.DOC  This file.
  10.   PMLIFE10.JPN  Japanese document (MS-Kanji encoded)
  11.   *.LIF         sample data
  12.   *.PAS         source files ( for Virtual Pascal/2 1.10 )
  13.   *.RC          source file ( resource )
  14.   *.h           source file ( included in resource )
  15.   *.ICO         source file ( icon )
  16.  
  17. 1.  Life Game
  18.   Conway's Life Game is a simple two-dimentional cell automation.
  19.   A two-dimentional field is devided into many "Cells" like a checker-
  20. board or Shogi(Chinese Chess)-board.  Every cell has alternatives of two
  21. kinds of state, which you can call 0/1 or Dead/Alive.  The fate of a cell
  22. is decided on the state of neighbouring 8 cells;
  23.  
  24.   1 2 3
  25.   4 A 5
  26.   6 7 8
  27.  
  28.   Every symbol ( 1, 2, ...8, and A) represents a distinct cell.  The time or
  29. generation has discrete value (T=0, 1, ... ).  If cell A is "Alive" and 2 or 3
  30. cells out of the eight bordering ones are "Alive" at generation [t], cell A 
  31. will remain "Alive"at the next generation [t+1].  If cell A is "Dead" and 3 cell
  32. s out of cell 1..8
  33. are "Alive", cell A will turn "Alive" at the next generation.  In the other
  34. cases cell A cannot survive and will turn "Dead" at the next generation.
  35.  
  36.   In contrast to these simple conditions, Life Game shows amazingly complexed
  37. properties.  Run PMLIFE and start "RPENTO.LIF" and you can see houndreds of
  38. cells are born from just five cells.  If you get to be interested in Life Game,
  39. I will suggest you to read the reference books such as ;
  40.  
  41.   THE RECURSIVE UNIVERSE by William Poundstone, 1985
  42. (Japanese translation : "LIFE GAME NO UCHU" by Makoto Arisawa, Nihon Hyoron Sha
  43.  1990 ) 
  44.  
  45.   Sorry, I read this in Japanse translation, so I do not know the original
  46. publisher X-).  Sample data included in this archive are described in this book.
  47.  
  48. 2. Capacity
  49.   In PMLIFE 1.0, you can choose a field size from 1024 x 1024, 512 x 512, or
  50. 256 x 256 and the maximal "Alive" cell number is 10000.  Number of data file
  51. must be less than 100.
  52.  
  53. 3. Running PMLIFE
  54.  
  55.  1: Data Files
  56.       PMLIFE 1.0 requiers data files which define initial cell data. File
  57.     name must be "*.LIF".  Long file name can be used (except for multi-dotted
  58.     names), and these file must be in the same directory (folder) to
  59.     PMLIFE.EXE.
  60.  
  61.  2: Format of Data Files
  62.       An ASCII text file.  Please use your favourite editor to describe this.
  63.     Of course, OS/2 system editor (E.EXE) or EPM.EXE are enough to do it.
  64.       Length of every line cannot exceed 255.  Cell information lines must be
  65.     less than 446. "Alive" cells must be less than 1000.   
  66.  
  67.     [Example] RPENTO.LIF     ... [explanation]
  68.     r Pentomino              ... Title.  Shown in the file selection listbox.
  69.     0 0                      ... X offset, Y offset.
  70.     comment line 1           |
  71.      ...                     |   Comment lines (no limitation 
  72.     comment line n           |   in line number)
  73.     BEGIN                    ... Indicates the beginning of cell information 
  74.                                  lines.
  75.     aa                       |   Cell information lines.
  76.     _aa                      |   <a> : alive. <->, <_>, space : dead.
  77.     _a                       |
  78.     [END OF FILE]
  79.  
  80.       In setting X and Y offset, lower left angle of the windows is
  81.     (1, 1).  Value 0 means horizontal/vertical centre of the window. In sample
  82.     above, the upper left end of "r" shape is set to the centre of the 
  83.     window.  
  84.  3: Menus
  85.     Li[F]e   : Running control
  86.       [I]nit    : Intialise the field and load a data file.
  87.       [A]dd     : load a data file and add the cells to the current field.
  88.       [S]tart   : Start/Restart running
  89.       [E]nd     : Stop running  
  90.       [Q]uit    : Quit the program. Alt+Q/Alt+X can be used too.
  91.  
  92.     Init/Add menu :
  93.       Select loading file in the File Selection Listbox.  You can check the
  94.     Rotation Radiobuttons to change direction of the form.  If you want a
  95.     mirror-image, use the Reverse CheckBoxes. Values entered in the X/Y Offset
  96.     Entryboxes override the offset values described in the data file.
  97.       Add menu is useful to study interference of two or more figures.  For
  98.     instanse, please load FLYING.LIF (init menu) and add GGUN.LIF (add menu)
  99.     then start the game.  A flying machine moves from left to right with an
  100.     "afterburner".  This machine will be shot down by 'Gliders' ejected from
  101.     Glider gun.  Is this "attack" safe for the gun?
  102.  
  103.     [O]ption : Running options
  104.       [D]elay   : Set running speed.
  105.       En[L]arge : Enlarge the display
  106.       Sh[R]ink  : Shrink the display
  107.       [C]olour  : Set colour
  108.       Field Size: Set field size and wrapping/no wrapping mode
  109.       Load      : Load a setting file
  110.       Save      : Save current setting into a file
  111.       Save as Default : Save current setting as program default
  112.  
  113.     Delay manu    :
  114.       If delay value is non zero, DosSleep API is called at the end of the
  115.     generation.  Larger value, slower running.  The Idle Time Checkbox is set
  116.     at default (the calculation is done as a background task with almost no 
  117.     disturbance to other tasks).  Turning this off, its calculation thread 
  118.     runs at the regular priority (runs faster, using more CPU time 
  119.     resource).   
  120.  
  121. 4.  Free software
  122.   PMLIFE is a free software.  You may use and distribute this freely.  You may
  123. also reconstruct this.  However you MUST address what differences you made and
  124. who is the original auther.
  125.  
  126. 5.  Come on to Pascal PM Programming!
  127.   There are many OS/2-native Pascal compilers now.  In PMLIFE, I used Virtual
  128. Pascal for OS/2 from fPrint U.K.  That is a good compiler from which you can
  129. find every good things you experienced in Turbo Pascal.   There are other 
  130. Pascal compilers, Speed Pascal for OS/2 from SpeedSoft, TMT Pascal from TMT, 
  131. GNU Pascal compiler for EMX....
  132.   I include all source files of PMLIFE in this archive to show extended
  133. Pascal can be used in PM programming without deep knowledges and skill of
  134. C and PM.
  135.   Though Pascal may be an old tool, it could open the door to PM programming. 
  136.  
  137.  
  138.  
  139.                          // Computer       //
  140.                          //  Aided         //
  141.                          //   Trivialities //
  142.  
  143.                                                The Creative CAT 1995
  144.                                                CompuServe 100230,430
  145.                                                NiftyServe GHF03464
  146.                                                toda@med.niigata-u.ac.jp
  147.